﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ITSupportPlatform.DAL;

namespace ITSupportPlatform
{
    public partial class NoticeContent : System.Web.UI.Page
    {
        public string PanelTitle { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request["id"];
                if (string.IsNullOrEmpty(id))
                {
                    return;
                }
                dynamic info = new DataFromSharePoint().GetNoticeById(id);
                if (info==null)
                {
                    return;
                }

                NoticeTitle.InnerText =info.Title;
                NoticeDetail.InnerHtml = info.Body;
            }
        }
    }
}